/**
 * @file       EscKeyPressEvent_test.cpp
 * @brief      TODO
 * @author     Huabo Zheng
 * @date       Jan 30, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#include "EscKeyPressEvent.h"
#include "gtest/gtest.h"
#include "typedefine.h"
#include "errorcode.h"
#include "MockFrame.h"
namespace NS_LCD_AFW
{
class CEscKeyPressEvent_test : public ::testing::Test
{
public:
	virtual void SetUp()
	{
	}
	virtual void TearDown()
	{
	}
};
TEST_F(CEscKeyPressEvent_test,test_defualtConstruction)
{
	CEscKeyPressEvent *pEvent = new  CEscKeyPressEvent();
	EXPECT_EQ(ESC_KEY_PRESSED_EVENT_ID,pEvent->getEventId());
	EXPECT_EQ(IEvent::KEYBOARD_EVENT_CODE,pEvent->getCode());
	OBJ_DESTORY(pEvent);

}
TEST_F(CEscKeyPressEvent_test,test_doProcess)
{
	CKeyboardEvent *pEvent = new  CEscKeyPressEvent();
	CFrame *pFrame = new CMockFrame();
	EXPECT_EQ(ERR_EVENT_UN_HANDLED,pEvent->doProcess(pFrame));
	OBJ_DESTORY(pFrame);
	OBJ_DESTORY(pEvent);
}
} /* namespace NS_LCD_AFW */
